package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.util.Objects;

/***
 *@ClaseName:TbVip
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 14:14
 */
@Entity
@Table(name = "tb_vip", schema = "simpleshop", catalog = "")
public class TbVip {
    private int id;
    private String level;
    private Integer discount;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "level")
    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @Basic
    @Column(name = "discount")
    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbVip tbVip = (TbVip) o;
        return id == tbVip.id &&
                Objects.equals(level, tbVip.level) &&
                Objects.equals(discount, tbVip.discount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, level, discount);
    }
}
